package com.voice.call.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.voice.call.service.CallVosBillService;
import com.voice.call.service.HandlerVosBillService;
import com.voice.call.service.InviteVosBillService;

@Service
public class HandlerVosBillServiceImpl implements HandlerVosBillService{

	
	@Resource
	private InviteVosBillService inviteVosBillService;
	
	@Resource
	private CallVosBillService callVosBillService;
	
	@Override
	public String handlerVosBill(String callInfo){
		
		if(callInfo.startsWith("INVITE")){
			return inviteVosBillService.getVosResponseText(callInfo);
		}else if(callInfo.startsWith("ACK")){
			return null;
		}
		return callVosBillService.getVosResponseText(callInfo);
		
	}
}
